;;; set-yasnippet.el - settings for yasnippet.
;;;  
;;; Copyright (C) 2011 Jeffy Du
;;;  
;;; Author: Jeffy Du (cmdxiaoha@163.com)
;;; Create: 2011-12-23 09:51:54
;;; Last Modified: 2011-12-23 09:53:12
;;;  
;;; History:
;;; --------
;;; 2011-12-23  v0.1  Jeffy Du (cmdxiaoha@163.com)
;;;     1. Initial revision.

(require 'yasnippet)

;;; setup the trigger key.
(setq yas/trigger-key "")
(define-key yas/minor-mode-map (read-kbd-macro "TAB") 'yas/expand-from-trigger-key)
(define-key yas/minor-mode-map (read-kbd-macro "M-RET") 'yas/expand-from-trigger-key)

;;; load snippet directorys.
(setq yas/snippet-dirs (concat my-emacs-root-path "snippets"))
(yas/load-directory yas/snippet-dirs)

;;; use dropdown list to select dulplicate snippets.
(require 'dropdown-list)
(setq yas/prompt-functions '(yas/dropdown-prompt))

;;; enable yasnippet in all mode.
(yas/global-mode 1)
